/*
 * fLabel.h
 *
 *  Created on: 2011-3-17
 *      Author: 
 */

#ifndef YUEBAOLABEL_H_
#define YUEBAOLABEL_H_

#include "fFramework.h"
#include "fBaseControl.h"
#include "YuebaoSplashString.h"
class fLabel : public fControlBase
{
public:
    ~fLabel( );
    static fLabel *NewL( fEngine * aEngine );
    static fLabel *NewLC( fEngine * aEngine );
private:
    fLabel( );
    void ConstructL( fEngine * aEngine );
protected:
    virtual void RenderFrame( );
    virtual void HandleKey( f_KEY_DES * aKeyDes );
    TInt HandleMouse( fMouseEvent /*nType*/, TPoint /*sPoint*/);
private:
    void Layout( );
private:
    int _text_y_offset;
    int _text_x_offset;
    bool _layouted;
public:
    void SetCotent( const TDesC& content );
    void SetFontSize( int size );
    void SetRect( const TRect& aRect );
protected:
    CFont* _font;
    HBufC* _content;
    DrawableString _splashString;
public:
    int _text_color;
    int _back_color;
    int _text_align;

    enum TTextAlign
    {
        ELeft, ECenter, ERight
    };
};
#endif /* YUEBAOLABEL_H_ */
